package cn.wolfcode.p2p.base.controller;

import cn.wolfcode.p2p.Exception.ErrorCode;
import cn.wolfcode.p2p.base.service.ISendMessageService;
import cn.wolfcode.p2p.util.AssertUtil;
import cn.wolfcode.p2p.util.JSONResult;
import cn.wolfcode.p2p.util.JSONResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class SendMessageController {

    @Autowired
    private ISendMessageService sendMessageService;

    @RequestMapping("/sendMessage")
    @ResponseBody
    public Object sendMessage(String phoneNumber){
        sendMessageService.sendMessage(phoneNumber);
        return JSONResultUtil.jsonResult();
    }
}
